     

import {getAuthorization,getAuthorizationIphone} from '../../src/utils/auth.js'		
		
	export default function(){
		const pages = getCurrentPages();
		// 获取当前页面（数组中的最后一个）
		const currentPage = pages[pages.length - 1];
		// 获取当前页面路径
		const currentPath = currentPage.route;
		 const token = uni.getStorageSync("token")
		console.log(currentPath,"当前页面路径");
		
		if(currentPath!=="/pages/login/login"){
			if(
			// !getAuthorization()&&
			!getAuthorizationIphone() ){
				
					uni.redirectTo({
						url:"/pages/login/login"
					})
								
			}
			// else if(getAuthorization()&&!getAuthorizationIphone()){
			// 	uni.navigateTo({
			// 		url:"/src/pages/logins/logins"
			// 	})
			// }
			
		}
		
		
		
	}
		
		